<template>
	<div class="slider-wrapper">
	    <slider v-if="slider.length">
		     <div v-for='(item,index) in slider'>
			      <a :href="item.url">
			       	<img :src="item.pic">
			      </a>
		     </div>
	    </slider>
   </div>
</template>

<script>
import Slider from 'components/nav/scroll'
import config from "@/config";
import axios from "axios";
export default {
 data () {
	  return {
	   slider: []
	  }
 },
 mounted(){
 	axios.get("/navscroll").then((res)=>{
 		console.log(res)
 		this.slider=res.data.data;
 		console.log(this.slider)
 	}).then(()=>{
 		this.sort()
 	})
 },
 methods: {
   	sort(){
   		this.slider.sort((a,b)=>{
   			return a.id-b.id
   		})
   	}
 },
 components: {
  Slider,
 }
}
</script>
<style>
.slider-wrapper{
 width: 100%;
 position: relative;
 overflow: hidden;
}


</style>